package com.jeeplus.cms.config.freemarker.function;

import com.jeeplus.cms.util.CmsUtils;
import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModelException;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author WuXilin
 */
@Component
public class GetCarouselContentsList implements TemplateMethodModelEx {

    @Override
    public Object exec(List list) throws TemplateModelException {
        String siteId = list.get(0).toString();
        return CmsUtils.getCarouselContentsList(siteId);
    }
}
